
<template>
	<view class="page_box">
		<u-navbar :is-back="true" title="上传合同" v-if="1" :border-bottom="false"></u-navbar>

		<view class="content_box">
			<view class="tipc-top flex align-center">
				<u-icon name="bell" color="#C58D15" size="28" class="margin-right-sm"></u-icon>
				<text style="color: #c58d15;font-size: 24rpx;">需上传住房合同，平台审核通过后即可发布</text>
			</view>
			<u-form :model="form" ref="uForm" class="form">
				
				<u-form-item :border-bottom="false" class="form-item">
					<view class="form-content ">
						<view class="lable-box flex justify-between">
							<text class="form-lable">上传合同</text>			
							<text class="end-text">最多4张</text>
						</view>
						<view class="form-data">
							<u-upload
								width="156"
								height="156"
								max-count="4"
								ref="uUpload"
								action="#"
								:auto-upload="auto_upload"
								upload-text=" "
							 ></u-upload>
						</view>
					</view>
				</u-form-item>
				<u-form-item :border-bottom="false" class="form-item">
					<view class="form-content flex-wrap border-bottom-none">
						<button class="circle-btn" @click="submit()">提交审核</button>
					</view>
				</u-form-item>
			</u-form>
		</view>

		<yy-login v-if="vuex_login"></yy-login>
		<yy-loading text="加载中.." mask="true" click="true" ref="loading"></yy-loading>
		<u-toast ref="uToast" />
	
	</view>
</template>

<script>
export default {
	data() {
		return {
			auto_upload:false,
		};
	},
	onShow() {
		
	},
	onLoad(e) {},
	methods: {
		submit() {
			let files = []
			files = this.$refs.uUpload.lists;
			if(files != ''){
				console.log(files)
				uni.showToast({
					title:"提交成功",
					icon:"none"
				})
				setTimeout(()=>{
					uni.redirectTo({
						url:"./rlse_case"
					})
				},1000)
			}else{
				uni.showToast({
					title:"请上传合同",
					icon:"none"
				})
			}
		},
	}
};
</script>

<style lang="scss" scoped>
.page_box {

}

.content_box {
	.form{
		/deep/.u-form-item{
			padding: 0;
			line-height: 0;
		}
		.form-content{
			display: flex;
			justify-content: space-between;
			flex-direction: column;
			padding: 40rpx 22rpx;
			width: 100%;
			.lable-box{
				line-height: 50rpx;
			}
			.form-lable{
				white-space: nowrap;
				margin-right: 30rpx;
				font-size: 30rpx;
				font-family: PingFang SC, PingFang SC-Medium;
			}
			.form-data{
				width: 100%;
				margin-top: 30rpx;
			}
			.end-text{
				font-size: 26rpx;
				color: #999999;
			}
			.textarea-data{
				padding: 0;
				overflow: hidden;
				background: #f7f7f7;
				border-radius: 20rpx;
				box-sizing: border-box;
				.textarea{
					height: 300rpx;		
					padding: 42rpx 28rpx;
					width: 100%;
				}
			}
			.circle-btn{
				background: #4a515b !important;
				color: #FFFFFF;
				border-radius: 45rpx;
				font-size: 30rpx;
				font-weight: 700;
				line-height: 90rpx;
				margin: 98rpx 0 50rpx;
				width: 100%;
				font-family: PingFang SC, PingFang SC-Bold;
			}
		}
	}
	.tipc-top{
		width: 100%;
		background-color: rgba(255,180,0,0.2);
		height: 60rpx;
		padding: 0 22rpx;
	}
}
</style>
